package org.web.demo.listener;

import lombok.extern.slf4j.Slf4j;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionActivationListener;
import javax.servlet.http.HttpSessionEvent;

/**
 * @author yexi
 */
@WebListener
@Slf4j
public class CustomHttpSessionActivationListener implements HttpSessionActivationListener {
    @Override
    public void sessionWillPassivate(HttpSessionEvent se) {
        log.info("session即将钝化");
    }

    @Override
    public void sessionDidActivate(HttpSessionEvent se) {
        log.info("session活化完毕");
    }
}